#include<iostream>
#include<map>
using namespace std;

/*
    map.count()
        统计元素个数，查找符合的键
            找到则返回1，否则返回0
*/

int main()
{
    map<string, string> map1;

    map1.insert(pair<string, string>("张三", "2528班级"));
    map1.insert(pair<string, string>("小张", "2528班级"));
    map1.insert(make_pair("李四", "2530班级"));
    map1.insert(pair<string, string>("王五", "2528班级"));

    cout << map1.count("张三") << endl;

    for(auto it : map1)
    {
        cout << it.first << " " << it.second << endl;
    }
    
    return 0;
}